﻿<navigation:Page x:Class="NthParameterSeries.Views.PortfolioView" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           xmlns:b="clr-namespace:NthParameterSeries.Behaviors"
           xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
 
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="PortfolioView Page" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" 
                 xmlns:my="clr-namespace:NthParameterSeries.PriceServiceReference" 
                 xmlns:comm="clr-namespace:NthParameterSeries.Commands"
                 xmlns:model="clr-namespace:NthParameterSeries.Models" Loaded="Page_Loaded">
    <sdk:Page.Resources>
        <CollectionViewSource x:Key="daoPortfolioViewSource" d:DesignSource="{d:DesignInstance my:DaoPortfolio, CreateList=True}" />
        <comm:SavePortfolioCommand x:Key="SavePortfolioCommand"/>
        <!--CollectionViewSource x:Key="daoCountryViewSource" d:DesignSource="{d:DesignInstance my:DaoCountry, CreateList=True}" /-->
    </sdk:Page.Resources>
    <Grid x:Name="LayoutRoot" >
        <Grid HorizontalAlignment="Left" Margin="61,231,0,0" Name="grid1" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="158" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <sdk:Label Content="Country:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <!--ComboBox  Grid.Column="1" Height="23" HorizontalAlignment="Left" 
                      ItemsSource="{Binding Countries}" Margin="3,3,0,3" Name="countryComboBox"
                      VerticalAlignment="Center" Width="155">
               
            </ComboBox-->
            <ComboBox ItemsSource="{Binding Path=Countries}" Grid.Row="0" Grid.Column="1" Width="155" Height="23"
                      DisplayMemberPath="Name"
                  SelectedValuePath="Name"
                      SelectedValue="{Binding Path=Country}"/>
            <TextBlock Text="You Picked :" Grid.Row="2"/>
            <TextBox Text="{Binding FavoriteConf}" Grid.Row="2"
                     Grid.Column="1"/>

        </Grid>
        <Grid HorizontalAlignment="Left" Margin="54,41,0,0" Name="grid2" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <sdk:Label Content="Name:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Height="23" HorizontalAlignment="Left" Margin="14,3,0,3" Name="nameTextBox" Text="{Binding Path=Name, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="155" />
        </Grid>
        <Grid HorizontalAlignment="Left" Margin="51,114,0,0" Name="grid3" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <sdk:Label Content="Inception Date:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <sdk:DatePicker Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="inceptionDateDatePicker" SelectedDate="{Binding Path=InceptionDate, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="120" />
        </Grid>
        <Button Content="Save" Height="23" HorizontalAlignment="Left" Margin="195,163,0,0" Name="SaveButton" 
                 VerticalAlignment="Top" Width="75" />
        <Grid DataContext="{StaticResource daoPortfolioViewSource}" HorizontalAlignment="Left" Margin="353,59,0,0" Name="grid4" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <sdk:Label Content="City:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="0" Height="23" HorizontalAlignment="Left" Margin="3" Name="cityTextBox" Text="{Binding Path=City, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="120" />
            <sdk:Label Content="Country:" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <ComboBox DisplayMemberPath="Country" Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" ItemsSource="{Binding Path=Country.Length, Mode=TwoWay}" Margin="3" Name="countryComboBox" VerticalAlignment="Center" Width="120">
                <ComboBox.ItemsPanel>
                    <ItemsPanelTemplate>
                        <VirtualizingStackPanel />
                    </ItemsPanelTemplate>
                </ComboBox.ItemsPanel>
            </ComboBox>
            <sdk:Label Content="Id:" Grid.Column="0" Grid.Row="2" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="2" Height="23" HorizontalAlignment="Left" Margin="3" Name="idTextBox" Text="{Binding Path=Id, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="120" />
            <sdk:Label Content="Inception Date:" Grid.Column="0" Grid.Row="3" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <sdk:DatePicker Grid.Column="1" Grid.Row="3" Height="23" HorizontalAlignment="Left" Margin="3" Name="inceptionDateDatePicker1" SelectedDate="{Binding Path=InceptionDate, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="120" />
            <sdk:Label Content="Name:" Grid.Column="0" Grid.Row="4" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
            <TextBox Grid.Column="1" Grid.Row="4" Height="23" HorizontalAlignment="Left" Margin="3" Name="nameTextBox1" Text="{Binding Path=Name, Mode=TwoWay, ValidatesOnExceptions=true, NotifyOnValidationError=true}" VerticalAlignment="Center" Width="120" />
        </Grid>
        <!--i:Interaction.Behaviors>
            <b:SubmitChangesBehavior TargetObject="{Binding  SubmitPortfolio}"/>
                </i:Interaction.Behaviors-->
                
    </Grid>
</navigation:Page>
